import React, { Component } from 'react'
import { Switch, Route, Redirect } from 'react-router-dom';

import ProductHome from "./home";
import ProductDetail from "./detail";
import ProductAddUqdate from "./add-update";

import './product.less';

export default class Product extends Component {
    render() {
        return (
            <Switch>
                <Route path='/product' component={ProductHome} exact />
                <Route path='/product/addupdate' component={ProductAddUqdate} />
                <Route path='/product/detail' component={ProductDetail} />
                <Redirect to='/product' />
            </Switch>
        )
    }
}